From: Øyvind Kolås By default the babl API is assuming data to be (unbounded) sRGB data, data
- being sRGB defines the conversion to and from gray-scale as well as the gamma
+ All pixel formats in babl have a specified color space, if NULL is passed
+as a space constants for (unbounded) linear sRGB data is assumed, data being
+sRGB defines the conversion to and from gray-scale as well as the gamma
- or Transfer Response Curve, TRC, used for converting between linear and
- non-linear variants of the data.
- Color Management
-
babl has API for creating a format for a specific space: - babl_format_with_space("R'G'B' u16", babl_space ("Rec2020")) creates - a 16 bit integer format for the Rec2020 color space. Babl knows internally - about "sRGB", "Rec2020", "Adobe", "Apple" and "ProPhoto" spaces, as they are - defined with constants on their wikipedia pages. -
+babl_format_with_space("R'G'B' u16", babl_space ("Rec2020")) creates a +16 bit integer format for the Rec2020 color space. Babl knows internally about +"sRGB", "Rec2020", "Adobe", "Apple", "ProPhoto", "ACEScg" and "ACES2065-1" +spaces, as they are defined with constants on their wikipedia pages or similar upstream references.Additional spaces can be loaded from monitor-class matrix+TRC ICC v2 and v4 profiles. Using babl_icc_make_space (see babl.h for details). The space of a babl format can also be queried with babl_format_get_space.
-The conversions babl does with ICC profiles are according to what is known - as the relative-colorimetric intent, monitor profiles containing both the - matrices used by babl and 3d CLUTs (color look up tables) sometimes also do - relative-colorimetric transfer for the "perceptual" intent CLUTs, but with - a more flexible and possibly higher accuracy conversions.
+ +CMYK handling is done using babl-spaces created with ICC profiles +containing CMYK profiles. BablSpaces for these ICC profiles handle color conversions using lcms2 - or if compiled without lcms2 support a naive profile independent fallback.
+When a babl space derived from a CMYK ICC profile is used to instantiate +RGB formats, the resulting formats are using the default/NULL space for +primaries and TRCs.
+ +The CMYK formats that use lcms2 for color interchange with the rest of +babl are the following, which are available for all data types, u8, u16, half +and float:
+